package com.xfapp.demos.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 存储用户答题记录的表
 * </p>
 *
 * @author jinYi
 * @since 2025-06-06
 */
@Getter
@Setter
@TableName("t_user_answer")
public class UserAnswer implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 答题记录ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 题目ID
     */
    @TableField("question_id")
    private Long questionId;

    /**
     * 用户选择的答案
     */
    @TableField("user_answer")
    private String userAnswer;

    /**
     * 是否答对（0错误，1正确，2无答案）
     */
    private Integer correct;

    /**
     * 答题时间
     */
    @TableField("update_time")
    private String updateTime;


}
